import pandas as pd
import requests

def geocode(key,address,city=None,batch=None,sig=None)->dict:
    url = "https://restapi.amap.com/v3/geocode/geo?parameters"
    params={
        "key":key,
        "address":address,
        "city":city,
        "batch":batch,
        "sig":sig
    }
    response = requests.get(url,params=params)
    data = response.json()['geocodes']
    return data